package com.stu.mapper;

import com.stu.pojo.ScholarshipStuInformation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ScholarshipInformationMapper {



    /**
     * 根据basic_id、scholarshipType查询对应的id信息用于判断该学生有没有申请过奖学金
     * @param currentId
     * @param scholarshipType
     * @return
     */
    @Select("select id from scholarship_stu_information " +
            "where stu_id = #{currentId} and scholarship_type = #{scholarshipType}")
    Integer selectByBasicId(Long currentId, String scholarshipType);

    @Select("select * from scholarship_stu_information " +
            "where stu_id = #{currentId}")
    List<ScholarshipStuInformation> selectAllByBasicId(Long currentId);
}
